package com.zmn.oms.business.impl.third;

import com.zmn.common.utils.number.NumberUtil;
import com.zmn.oms.business.interfaces.third.Dj58ServicePriceItemService;
import com.zmn.oms.model.entity.third.Dj58ServicePriceItem;
import com.zmn.oms.persistence.interfaces.third.Dj58ServicePriceItemDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 类描述：查询58到家直约平台的服务项价目列表信息
 *
 * @author XieWenBing
 * @date 2019/11/13 11:20
 */
@Service
public class Dj58ServicePriceItemServiceImpl implements Dj58ServicePriceItemService {

    @Resource
    private Dj58ServicePriceItemDao dj58ServicePriceItemDao;

    /**
     * 根据啄木鸟平台的服务项Id查询58到家直约平台的服务线价目信息
     *
     * @param zmnProductId
     * @param zmnServiceId
     * @return
     */
    public Dj58ServicePriceItem findDj58ServicePriceItemByZmnProductIdAndServiceId(Integer zmnProductId,Integer zmnServiceId) {
        if (NumberUtil.isNullOrZero(zmnProductId) && NumberUtil.isNullOrZero(zmnServiceId)) {
            return null;
        }

        return dj58ServicePriceItemDao.findDj58ServicePriceItemByZmnProductAndServcieId(zmnProductId,zmnServiceId);
    }
}
